package com.example.houduan.controller;

import com.example.houduan.domain.*;
import com.example.houduan.service.*;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin
@RestController
public class test {
    @Resource
    private Wordservice wordservice;
    @Resource
    private Weeksumservice weeksumservice;
    @Resource
    private Flagsumservice flagsumservice;
    @Resource
    private Aridsumservice aridsumservice;
    @Resource
    private Viesumservice viesumservice;
    @Resource
    private Viestop10service viestop10service;

    //地图
    @GetMapping("/maplist")
    public List<Wordcount> wordlist(){
        return wordservice.list();
    }
    //周总数据
    @GetMapping("/sweeklist")
    public List<Weeksum> sweeklist(){
        return weeksumservice.list();
    }
    //标签
    @GetMapping("/flaglist")
    public List<Flagsum> flaglist(){
        return flagsumservice.list();
    }
    //作者
    @GetMapping("/aridlist")
    public List<Aridsum> aridlist(){
        return aridsumservice.list();
    }
    //单个视频
    @GetMapping("/vieslist")
    public List<Viesum> vieslist(){return viesumservice.list();}
    //获取top10
    @GetMapping("/vieslist10")
    public List<Viesumtop10> vieslist10(){return viestop10service.list();}

}
